<?php

namespace app\common\validate;
use think\Validate;

class GoodsValidate extends Validate
{
    protected $rule = [
        'goods_name'  =>  'require|unique:saas_goods',
//        'price'  =>  'require|number',
//        't_price'  =>  'require|number',
        'img'  =>  'require',
        'desc'  =>  'require',
    ];

    protected $message = [
        'goods_name.require'  =>  '商品名称必须填写',
        'goods_name.unique'  =>  '商品名称已存在',

//        'price.require'  =>  '商品价格必须填写',
//        'price.number'  =>  '价格必须是数字',
//        't_price.require'  =>  '团购价格必须填写',
//        't_price.number'  =>  '团购价格必须是数字',

        'img.require'  =>  '商品封面必须',

        'desc.require'  =>  '商品详情必须填写',

    ];
}
